package com.yantong.mapper;

import com.yantong.pojo.StoreFreechargeMiddle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StoreFreechargeMiddleMapper {
	/**
	 * delete by primary key
	 *
	 * @param id primaryKey
	 * @return deleteCount
	 */
	int deleteByPrimaryKey(Long id);

	/**
	 * insert record to table
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insert(StoreFreechargeMiddle record);

	/**
	 * insert record to table selective
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insertSelective(StoreFreechargeMiddle record);

	/**
	 * select by primary key
	 *
	 * @param id primary key
	 * @return object by primary key
	 */
	StoreFreechargeMiddle selectByPrimaryKey(Long id);

	/**
	 * update record selective
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKeySelective(StoreFreechargeMiddle record);

	/**
	 * update record
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKey(StoreFreechargeMiddle record);

	int deleteByActivityProductIdAndType(@Param("activityProductId") Long activityProductId, @Param("type") Integer type);

	List<StoreFreechargeMiddle> selectByActivityProductId(@Param("activityProductId") Long activityProductId);

	List<StoreFreechargeMiddle> selectByActivityProductIdAndType(@Param("activityProductId") Long activityProductId, @Param("type") Integer type);


}